Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a policy to reauthorize the credential when invalid #2887

Merged
merged 13 commits into from
Jan 22, 2025

Conversation

adreed-msft
Copy link
Member

Description

  • Feature / Bug Fix: A bit of both actually. With long enough jobs under device code auth, the underlying token could totally time out and cause a job to abruptly fail. This PR adds in a pipeline policy that catches failures of this nature, and provides a prompt to reauthorize on the fly.

  • Related Links:

  • Email Subject: "AzCopy always fails trying to download a large file due to token expiration"

  • ADO Work Item # 29466291

Type of Change

  • Bug fix
  • New feature

How Has This Been Tested?

  1. Manually tested by trying to perform a transfer against a stg account I do not have access to, reauth-ing to an identity that does have access
  2. Logic test in TestDestReauthPolicy ensures the pipeline policy fundamentally works.

ste/destReauthPolicy.go Outdated Show resolved Hide resolved
ste/destReauthPolicy.go Outdated Show resolved Hide resolved
@dphulkar-msft
Copy link
Collaborator

There are some linting errors that need to be addressed. Could you please take a look and resolve them?

@vibhansa-msft vibhansa-msft added this to the 10.28.0 milestone Jan 20, 2025
@adreed-msft adreed-msft merged commit e11ecec into main Jan 22, 2025
23 checks passed
@adreed-msft adreed-msft deleted the adreed/reauth branch January 22, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants